package com.financing.platform.dao.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IActivitiesWinListDao;
import com.financing.platform.dto.ActivitiesWinListDTO;
import com.financing.platform.util.SqlName;


@SuppressWarnings("unchecked")
@Repository("activitiesWinListDaoImpl")
public class ActivitiesWinListDaoImpl extends BaseDaoImpl implements   IActivitiesWinListDao {

	@Override
	public List<ActivitiesWinListDTO> getActivitiesWinListList(
			ActivitiesWinListDTO activitiesWinListDTO) throws SQLException {
		return (List<ActivitiesWinListDTO>)this.sqlMapClient.queryForList(SqlName.queryActivitiesWinListList, activitiesWinListDTO);
	}

	@Override
	public int addActivitiesWinList(ActivitiesWinListDTO activitiesWinListDTO)
			throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.addActivitiesWinList, activitiesWinListDTO);
	}

	@Override
	public int queryActivitiesWinListCount(
			ActivitiesWinListDTO activitiesWinListDTO) throws SQLException {
		return (Integer)this.sqlMapClient.queryForObject(SqlName.queryActivitiesWinListCount, activitiesWinListDTO);
	}

	@Override
	public int delActivitiesWinList(ActivitiesWinListDTO activitiesWinListDTO)
			throws SQLException {
		return (Integer)this.sqlMapClient.delete(SqlName.deleteActivitiesWinList, activitiesWinListDTO);
	}
	
}
